package com.wangshidai;

import java.io.*;

//读取当前项目下Demo01.java复制到d:\\st0303文件夹下Demo01.java
public class Demo03 {

    public static void main(String[] args) throws IOException {
        File f1=new File("demo0303\\src\\com\\wangshidai\\Demo01.java");
        File f2=new File("d:\\st0303\\"+f1.getName());

        FileInputStream fis=new FileInputStream(f1);
        FileOutputStream fos=new FileOutputStream(f2);

        int b;
        while ((b=fis.read())!=-1){
            fos.write(b);

        }


        fis.close();
        fos.close();


    }
}
